Donwload today’s CRAN database
library("cranly")
p_db <- tools::CRAN_package_db()
Clean and organise author names, depends, imports, suggests, enhances
package_db <- clean_CRAN_db(p_db)
The resulting dataset carries the timestamp of when it was put together
attr(package_db, "timestamp")
#> [1] "2018-03-20 09:31:45 GMT"
Extract edges and nodes for the CRAN package network
package_network <- build_network(object = package_db)
Compute statistics for the package network
## Global package network statistics
package_summaries <- summary(package_network)
Top 10 packages according to various statistics
plot(package_summaries, according_to = "n_imported_by", top = 20)
plot(package_summaries, according_to = "page_rank", top = 20)
plot(package_summaries, according_to = "betweenness", top = 20)
plot(package_summaries, according_to = "n_enhances", top = 20)
plot(package_summaries, according_to = "n_authors", top = 20)
plot(package_summaries, according_to = "n_imports", top = 20)
The sub-network of my packages
my_packages <- package_by(package_network, "Ioannis Kosmidis")
visualize(package_network, package = my_packages)
Build CRAN collaboration network
author_network <- build_network(object = package_db, perspective = "author")
Compute statistics for the collaboration network
author_summaries <- summary(author_network)
Top 10 collaborators according to various network statistics
plot(author_summaries, according_to = "n_packages", top = 20)
plot(author_summaries, according_to = "page_rank", top = 20)
plot(author_summaries, according_to = "betweenness", top = 20)
R Core’s collaboration sub-network
visualize(author_network, author = "R Core")
Brian Ripley’s collaborneion sub-network
visualize(author_network, author = "Brian Ripley")
My collaboration sub-network (much much smaller that the above, of co)
visualize(author_network, author = "Kosmidis")